package com.ddxz.tool.sql.struct;

/**
 * 生成SQL或解析SQL是用到的常量
 * @author 朱宗刚
 * @version 1.0.0
 * @date 2020/2/28
 */
public interface SqlConstData {
    String KEY_COLUMN = "enName";
    String KEY_SCHEMA = "schema";
    String KEY_ALIAS = "alias";
    String KEY_TABLE = "enName";

    String SQL_AGG_TYPE = "statisticType";
    String SQL_SORT_TYPE = "sortType";
    String SQL_OPERATOR = "operator";
    String SQL_SINGLE_ARG = "beginValue";
    String SQL_FIRST_ARG = "beginValue";
    String SQL_SECOND_ARG = "endValue";
    String SQL_DATA_TYPE = "dataType";
    String SQL_CONNECT_TYPE = "conn";

    String SQL_SELECT = "SELECT ";
    String SQL_GROUP = " GROUP BY ";
    String SQL_FROM = " FROM ";
    String SQL_ORDER = " ORDER BY ";
    String SQL_WHERE = " WHERE ";
    String SQL_AND = " AND ";

    String SQL_AGG_END = ") ";

    String SQL_IN_BEGIN = "($";
    String SQL_IN_END = ")";

    String SQL_ALIAS = " AS ";
    String SQL_DELIMITER = ",";

    int QUERY_STATEMENT = 0;
    int STATISTIC_STATEMENT = 1;

    //region 数据类型
    /**
     * 长整数
     */
    int BIGINT = 0;
    /**
     * 字符串
     */
    int STRING = 1;
    /**
     * 整数
     */
    int INTEGER = 2;
    /**
     * 浮点数
     */
    int FLOAT = 3;
    /**
     * 日期时间
     */
    int DATETIME = 4;
    /**
     * 文本
     */
    int TEXT = 5;
    //endregion

    //region 数据库类型
    /**
     * PostgreSQL数据库
     */
    int PGSQL = 0;
    /**
     * Oracle数据库
     */
    int ORACLE = 1;
    /**
     * MySQL数据库
     */
    int MYSQL = 2;
    /**
     * SqlServer数据库
     */
    int MSSQL = 3;
    /**
     * 国产达梦数据库
     */
    int DMSQL = 4;
    //endregion
}
